package com.ldwu.home.controller;

import com.ldwu.home.dao.base.UserDaoMapper;
import com.ldwu.home.entity.base.UserEntity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.ui.ModelMap;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/")

public class Test_GetUserTableController {
    @Autowired
    private UserDaoMapper userDaoMapper;

    @RequestMapping(value = "/getusertable",method = RequestMethod.GET)
    @ResponseBody
    @ResponseStatus(HttpStatus.OK)
    public List<UserEntity> getUser() {
        List<UserEntity> list = userDaoMapper.listAllUsers();
        return list;
    }
}